#include "abstract_factory.h"
#include <iostream>

class WinButton : public AbstractButton
{
public:
    virtual void clicked() const override
    {
        std::cout << "winButton" << std::endl;
    }
};

class MacButton : public AbstractButton
{
public:
    virtual void clicked() const override
    {
        std::cout << "macButton" << std::endl;
    }
};

class WinCheckbox : public AbstractCheckbox
{
public:
    virtual void clicked() const override
    {
        std::cout << "winCheckbox" << std::endl;
    }
};

class MacCheckbox : public AbstractCheckbox
{
public:
    virtual void clicked() const override
    {
        std::cout << "macCheckbox" << std::endl;
    }
};

AbstractButton *WinFactory::createButton() const
{
    return new WinButton;
}

AbstractCheckbox *WinFactory::createCheckbox() const
{
    return new WinCheckbox;
}

AbstractButton *MacFactory::createButton() const
{
    return new MacButton;
}

AbstractCheckbox *MacFactory::createCheckbox() const
{
    return new MacCheckbox;
}
